1. Field of the Invention
The present invention relates to a digital still camera which records image data representing a photographed image after compressing the image data.
2. Description of the Related Art
In a digital still camera, in many cases, a target file size for recording image data is determined in advance according to image quality setting of the user (for example, FINE for high resolution, NORMAL for standard resolution, BASIC for basic resolution).
In such a digital still camera, image data obtained by photographing is compressed so that the amount of image data falls within a tolerable range of the target file size corresponding to the image quality setting, by repeating test compression to the photographed image data while changing a compression parameter to find an optimum compression parameter.
This is because in the JPEG format, widely used for compression processing to still images of digital still cameras, the size of compressed data changes significantly depending on characteristics of a captured scene. Therefore, in order to make the size of compressed data of image data from various scenes to fall within a predetermined range, it is necessary to adjust the level of compression by adopting an appropriate quantization parameter for individual image data.
Such adjustment of a compression ratio is performed by adjusting the quantization parameter with a scale factor SF, thereby realizing the compressed data having a fixed length, the quantization parameter being used when coding image data according to the JPEG format.
In a conventional general fixed-length compression processing technology, pre-compression are performed two or three times while changing the scale factor to estimate an optimum scale factor based on size variation of the compressed data obtained at this time, thereby adopting the estimated optimum value for the scale factor to obtain final compressed data (refer to Japanese Unexamined Patent Application Publication No. 2001-169280).
Also, there is a proposed method in which a model regarding size variation of compressed data corresponding to variation in value of scale factor is used to obtain the optimum value of the scale factor based on a result of a single pre-compression (refer to Japanese Unexamined Patent Application Publication No. 2004-56680).
Thus, when a compressed image is recorded in the storage medium such as a flash card by substantially fixing the length of compressed data, the expected number of images corresponding to the image quality is assured as the number of images to be recorded in a storage medium.
Further, the amount of compressed data recordable in a single storage medium has been increasing along with continuous massive increase in capacity of the storage media adopted for digital still cameras. Thus, when not so significant size variation in individual compressed data is averaged in the process of recording a large amount of compressed data in the same storage medium it is highly expectable that an amount of compressed data calculated from image quality setting is recorded.
However, along with recent significant increase in number of pixels to address demands for enhanced image quality, speeding up of image processing and image data compression by increasing the speed of hardware has reached a limitation since loads on an image processing unit and a data compression unit incorporated in digital cameras are on the increase. This is because the power consumption increases when the clock frequency of an image processing LSI is raised for increasing the processing speed, which drains the battery quickly and hinders assurance of sufficient operation time. Further, increasing the clock frequency has a limit, and increasing the speed of image processing and image compression processing that can be achieved by simply operating the hardware at high speed also has a limit.
However, if it takes longer to perform image processing and image compression processing as the number of pixels increases, then it is not fulfilling demands from users.
Following such tendencies, a technology of increasing the speed of fixed-length compression processing while allowing dispersion in size of individual image data to a certain extent is needed in order to respond to demands from a wide range of users, rather than a technology of making the size of individual compressed data to have a fixed length with quite high precision.